import service from "@/utils/request.ts";
import {COMPLETE_PRE} from '@/api/port-info.ts'

/**
 * 获取模型信息列表
 * @param params 参数
 */
export async function getAiConfigListReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/getAiConfigList',
        method: 'POST',
        data: params
    });
}

/**
 * 删除模型信息
 * @param params 参数
 */
export async function delAiConfigItemReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/delAiConfigItem',
        method: 'POST',
        data: params
    });
}

/**
 * 保存模型信息
 * @param params 参数
 */
export async function saveAiConfigItemReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/saveAiConfigItem',
        method: 'POST',
        data: params
    });
}

/**
 * 停用模型信息
 * @param params 参数
 */
export async function stopAiConfigReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/stopAiConfig',
        method: 'POST',
        data: params
    });
}

/**
 * 启用模型信息
 * @param params 参数
 */
export async function restartAiConfigReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/restartAiConfig',
        method: 'POST',
        data: params
    });
}

/**
 * 获取单个模型信息
 * @param params 参数
 */
export async function getOneAiConfigReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/getOneAiConfig',
        method: 'POST',
        data: params
    });
}

/**
 * 获取模型下拉框数据
 * @param params 参数
 */
export async function getModalConfigDropDownReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/getModalConfigDropDown',
        method: 'POST',
        data: params
    });
}

/**
 * ai沟通
 * @param params 参数
 */
export async function aiChatReq(params: any) {
    return service({
        baseURL: COMPLETE_PRE,
        url: 'admin/aiConfig/aiChat',
        method: 'POST',
        data: params
    });
}